<?php

/**
 * Form Element class
 * 
 * @author Mathieu Pheulpin - sokaru91@gmail.com
 *
 */
abstract class Mac_Form_Validator_Abstract
{
    /**
     *
     * @var Form_Element_Abstract
     */
    private $element;
    
    /**
     *
     * @var string
     */
    private $message;
    
    public function setElement (Mac_Form_Element_Abstract $element)
    {
        $this->element = $element;
    }
    
    protected function setMessage ($message)
    {
        $this->message = $message;
    }
    
    public function getMessage ()
    {
        return $this->message;
    }
    
    abstract public function isValid($value, array $context);
}